package br.com.locadora.util;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;

public class Util {
	
	private static final String UNIDADE_DE_PERSISTENCIA = "locadoraFilmes";

	private EntityManagerFactory entityManagerFactory = Persistence
			.createEntityManagerFactory(UNIDADE_DE_PERSISTENCIA);
	
	public EntityManager getEntityManager() {
		return entityManagerFactory.createEntityManager();
	}
}
